package com.ashley.day_0405;
//完数：除了本身以外的的所有约数的和等于其本身
public class WanShuTest {

	public static void main(String[] args) {
		for (int i = 1; i <= 1000; i++) {
			int factor = 0;
			for (int j = 1; j <= i / 2; j++) {
				if (i % j == 0) {
					factor += j;
				}
			}
			if (i == factor) {
				System.out.println(i);
			}
		}

	}

}
